package com.drinkian.authentication.controller;

import com.drinkian.authentication.service.IRegisterService;
import com.drinkian.entity.RequestResult;
import com.drinkian.authentication.entity.po.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("auth")
public class RegisterController {

    @Autowired
    private IRegisterService iRegisterService;

    @PostMapping("register")
    public RequestResult register(@RequestBody User user) {
        return iRegisterService.handleRegister(user);
    }
}
